define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'user.user_balance/index',
        delete_url: 'user.user_balance/delete',
    };

    var Controller = {

        index: function () {

            ea.table.render({
                init: init,
                defaultToolbar:['filter', {
                    title: '搜索',
                    layEvent: 'TABLE_SEARCH',
                    icon: 'layui-icon-search',
                    extend: 'data-table-id="' + 'user_group' + '"'
                }],
                toolbar:['refresh'],
                cols: [[
                    {field: 'roomid', minWidth: 80, title: '房间号'},
                    {field: 'price', minWidth: 80, title: '充值金额'},
                    {field: 'create_time', minWidth: 80, title: '充值时间',sreach:false},
                ]],
            });

            ea.listen();
        },
        recharge: function () {
            ea.listen();
        },
       
    };
    return Controller;
});